package com.atguigu.tingshu.search.api;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.search.service.ItemService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author:huzhongkui
 * Date: 2025-03-24 星期一 16:52:24
 * Description:
 */

@RestController
@RequestMapping("api/search/bloom")
public class BloomFilterController {

    @Autowired
    private ItemService itemService;


    @GetMapping("/rebuildBloomFilter")
    @Operation(summary = "手动重建布隆")
    public Result rebuildBloomFilter() {


        Boolean isFlag = itemService.rebuildBloomFilter();

        return Result.ok(isFlag);

    }


}
